package com.py.credit.entity;

import java.util.List;

/**
 * @author likai
 * <p>
 * 分类
 */
public class Category implements Comparable<Category> {

    /**
     *
     */
    private static final long serialVersionUID = -34558191087132359L;
    /**
     * ID
     */
    private int id;
    /**
     * 类别名称
     */
    private String name;
    /**
     * 类别编码
     */
    private String code;
    /**
     * K库、L类别
     */
    private String type;
    /**
     * 父节点ID
     */
    private int pId;

    /**
     * 根节点ID
     */
    private int rId;

    /**
     * 排序值
     */
    private Integer sort;

    private List<Category> children;

    private String typeString;

    private String checked;

    /**
     * 是否打开
     */
    private boolean open;

    /**
     * ztree 是否父节点
     */
    private String isParent;

    private String nocheck;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getpId() {
        return pId;
    }

    public void setpId(int pId) {
        this.pId = pId;
    }

    public int getrId() {
        return rId;
    }

    public void setrId(int rId) {
        this.rId = rId;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public List<Category> getChildren() {
        return children;
    }

    public void setChildren(List<Category> children) {
        this.children = children;
    }

    @Override
    public int compareTo(Category o) {
        return this.sort.compareTo(o.getSort());
    }

    public boolean isOpen() {
        return open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }

    public String getIsParent() {
        return isParent;
    }

    public void setIsParent(String isParent) {
        this.isParent = isParent;
    }

    public String getTypeString() {
        return typeString;
    }

    public void setTypeString(String typeString) {
        this.typeString = typeString;
    }

    public String getChecked() {
        return checked;
    }

    public void setChecked(String checked) {
        this.checked = checked;
    }

    public String getNocheck() {
        return nocheck;
    }

    public void setNocheck(String nocheck) {
        this.nocheck = nocheck;
    }


}
